#ifndef _GRAPH_ADT_
#define _GRAPH_ADT_
#include "hashTable.h"
#include <stdlib.h>
//一个表示邻接节点列表的结构
//A structure to represent an adjacency list node
typedef struct adjListnode
{
    int dest;
    AdjListNode *next;
} AdjListNode;

//一个表示邻接表的结构
//A structure to represent an adjacency list
typedef struct adjList
{
    AdjListNode *head;
} AdjList;

//一个表示图的结构。一个图是一个邻接表数组。数组大小为V
//A structure to represent a garph.A graph is an array of adjacency lists.
//Size of array will be V
typedef struct graph
{
    int V;
    AdjList *array;
} Graph;

//A utility function to create a new adjacency list node
AdjListNode *newAdjListNode(int dest)
{
    AdjListNode *newNode = (AdjListNode *)malloc(sizeof(*newNode));
    newNode->dest = dest;
    newNode->next = NULL;
    return newNode;
}

//
Graph *createGraph(int V)
{
    Graph *graph = (Graph *)malloc(sizeof(*graph));
    graph->V = V;

    //Create an array of adjacency lists. Size of array will be V。
    graph->array = (AdjList *)malloc(sizeof(AdjList) * V);

    //
}
#endif